<?php // no direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.html.pagination');
$limitstart	= JRequest::getVar('limitstart', 0, '', 'int');
$db =&JFactory::getDBO();
$query = "SELECT * FROM #__banner WHERE catid=35";
$db->setQuery($query);
$row = $db->loadObjectList();
$count=count($row);
$query = "SELECT * FROM #__banner WHERE catid=35 limit ".$limitstart.",12";
//$query .= ' limit '. $limitstart . ','.$limit;
$db->setQuery($query);
$row = $db->loadObjectList();
//echo count($row);
$pagination = new JPagination($count, $limitstart, 12);
?>
<div class="content-section">
			<div class="heading">
					<h2>Galleri</h2>
				</div>
			<div class="clear-fix" id="gallery-section">
				<div id="gallery-thumb">
					<ul>
						<?php 
						 for($i=0;$i<count($row);$i++){
                         ?>
                        <li class=""><a><img src="images/thumb/timthumb.php?src=images/banners/<?php echo $row[$i]->imageurl; ?>&w=103&h=83&zc=1" /></a></li>
					    <?php
                        }   
						?>
					</ul>
					<div class="clear"></div>
					<div id="gallery-paginator">
						<?php echo $pagination->getPagesLinks(); ?>	 
                   
					</div>					
				</div>
				<div id="gallery-image">
						
						<?php //echo $pagination->getPagesLinks(); ?>	 
						
                        <ul style="position: relative; width: 570px; height: 412px;">						
						    <?php 
						 for($i=0;$i<count($row);$i++){
                         ?>
                        <li style="position: absolute; top: 0px; left: 0px; display: none; z-index: 13; opacity: 0;"><a><img src="images/thumb/timthumb.php?src=images/banners/<?php echo $row[$i]->imageurl; ?>&w=570&h=412&zc=1" /></a></li>
							
                       
					    <?php
                        }   
						?>	
                            
                        </ul>
                        
						
				</div>
			</div>			
		</div>


